class crond::nrpe {
  case $nrpe_type {
    'nrpe': {
      file { "/root/bin/nrpe.sh":
        mode       =>  '755',
        owner      =>  'root',
        group      =>  'root',
        source     =>  "puppet:///modules/crond/nrpe.sh",
        require  => File['/root/bin'],
      }

      cron{ 'nrpe':
        command => "/root/bin/nrpe.sh",
        user    => 'root',
        minute  => '*/10',
        hour    => '*',
        month   => '*',
      }
    }
    default: {
      file { "/root/bin/nrpe.sh":
        mode       =>  '755',
        owner      =>  'root',
        group      =>  'root',
        source     =>  "puppet:///modules/crond/nrpe.sh",
        require  => File['/root/bin'],
      }
      cron{ 'nrpe':
        command => "/root/bin/nrpe.sh",
        user    => 'root',
        minute  => '*/10',
        hour    => '*',
        month   => '*',
      }
    }
  }
}
